﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using EzDesk.Core.Model;

using System.Xml.Linq;

namespace EzDesk.Core
{
    [ServiceContract]
    public interface ICoreClientService
    {
        #region [ for test ]
        [OperationContract]
        // for test
        string OutputStr(string str);
        #endregion

        #region [ Apps Method
        [OperationContract]
        IList<App> GetCurrentApps();


        [OperationContract]
        App GetAppByName(string appName);

        [OperationContract]
        IList<AppTask> GetAllAppTasks(Guid userId, string userAgent);
        [OperationContract]
        IList<AppTask> GetAppTasksByAppName(string appName, Guid userId, string userAgent);
        #endregion

        #region [ Feed Methods]

        [OperationContract]
        string GetXmlFeedsBetweenDate(string feedTypeStr, Guid userId, DateTime from, DateTime to, bool? isRead, bool? isAvaiable);

        [OperationContract]
        string GetXmlFeedsByCount(string feedTypeStr, Guid userId, int startIndex, int count, bool? isRead, bool? isAvaiable);


        [OperationContract]
        void SetFeedIsRead(Guid feedId, string memberString, bool isRead);
        [OperationContract]
        void SetFeedsIsRead(string feedIdStrs, string memberString, bool isRead);
        #endregion

        #region [UserProfile Method]

        [OperationContract]
        void ChangeUserDept(Guid userId, Guid deptId);
        [OperationContract]
        void ChangeUserReportId(Guid userId, Guid reportId);
        [OperationContract]
        void ChangeUserPosition(Guid userId, Guid positionId);

        [OperationContract]
        UserProfile CreateEmptyUserProfile(string userName);

        [OperationContract]
        UserProfile GetUserProfileById(Guid userId);
        [OperationContract]
        UserProfile GetUserProfileByUserName(string userName);
        [OperationContract]
        SimpleUser GetSimpleUserById(Guid userId);
        [OperationContract]
        IList<SimpleUser> GetSimpleUserInfos(string memberstring);

        #endregion



        [OperationContract]
        string Login(string uid, string pwd);
    }
}
